home *** CD-ROM | disk | FTP | other *** search
/ Nautilus 1992 July / Nautilus-3-8 / Nautilus-3-8.bin / Tools & Utilities / Techy Stuff / Doco ƒ / CSMP ƒ / CSMP-V1-061.TXT < prev    next >
Encoding:
Text File  |  1992-06-03  |  42.5 KB  |  1,021 lines

  1. C.S.M.P. Digest             Tue, 28 Apr 92       Volume 1 : Issue 61
  2.  
  3. Today's Topics:
  4.  
  5.     comparing two ressource fork
  6.     NewsWatcher -- program advice needed
  7.     How to buy Zortech C++ ed. disc.!!?
  8.     MPW lib and dependencies
  9.     Writing a ResEdit editor - Questions & bugs
  10.     __NewPtr
  11.     Sound resources
  12.  
  13.  
  14. The Comp.Sys.Mac.Programmer Digest is moderated by Michael A. Kelly.
  15.  
  16. These digests are available (by using FTP, account anonymous, your email
  17. address as password) in the pub/mac/csmp-digest directory on ftp.cs.uoregon.
  18. edu.  This is also the home of the comp.sys.mac.programmer Frequently Asked
  19. Questions list.  The last several issues of the digest are available from
  20. sumex-aim.stanford.edu as well.
  21.  
  22. These digests are also available via email.  Just send a note saying that you
  23. want to be on the digest mailing list to mkelly@cs.uoregon.edu, and you will
  24. automatically receive each new digest as it is created.
  25.  
  26. The articles in these digests are taken directly from comp.sys.mac.programmer.
  27. They are not edited; all articles included in this digest are in their original
  28. posted form.  The only articles that are -not- included in these digests are
  29. those which didn't receive any replies (except those that give information
  30. rather than ask a question).  All replies to each article are concatenated
  31. onto the original article in the order in which they were received.  Article
  32. threads are not added to the digests until the last article added to the
  33. thread is at least one month old (this is to ensure that the thread is dead
  34. before adding it to the digests).
  35.  
  36. Send administrative mail to mkelly@cs.uoregon.edu.
  37.  
  38. -------------------------------------------------------
  39.  
  40. From: cdoucet@mais.hydro.qc.ca (cdoucet)
  41. Subject: comparing two ressource fork
  42. Date: 26 Mar 92 01:51:24 GMT
  43.  
  44. is there any program that compare two resource fork and
  45. give the difference???
  46. thank's is advance
  47.  
  48. thered@rot.qc.ca
  49. Eric Surprenant
  50.  
  51. +++++++++++++++++++++++++++
  52.  
  53. From: Michael_Hecht@mac.sas.com (Michael Hecht)
  54. Date: 26 Mar 92 15:07:16 GMT
  55. Organization: SAS Institute Inc.
  56.  
  57. In article <cdoucet.701574684@tdsb-s>, cdoucet@mais.hydro.qc.ca (cdoucet) writes:
  58. > is there any program that compare two resource fork and
  59. > give the difference???
  60.  
  61. Yes, I wrote one. It's called ResCompare. It also allows you to selectively
  62. apply the updates from one file to the other. We find this invaluable for
  63. helping us write multi-user THINK C applications.
  64.  
  65. It also allows you to save the differences as a self-applying patch.
  66.  
  67. If you (or anyone else) would like a copy, just send me e-mail. It's free.
  68.  
  69. - --Michael
  70.  
  71. =======================================================================
  72. Michael P. Hecht                 | Internet:  Michael_Hecht@mac.sas.com
  73. SAS Institute Inc.; Cary, NC USA | AppleLink: SAS.HECHT
  74.  
  75. ---------------------------
  76.  
  77. From: bug@anas.udac.uu.se (Bernt Budde)
  78. Subject: NewsWatcher -- program advice needed
  79. Date: 13 Mar 92 18:20:42 GMT
  80. Organization: UDAC, Uppsala, Sweden
  81.  
  82. I've got a few questions that's got to be simple:
  83.  
  84. I'm trying to rewrite the NewsWatcher program to handle > 32kb
  85. data in the List Manager. My kludge is to store a 2 byte offset
  86. in the cell to where in an array I store a pointer & length.
  87. You can get 8000 cells in a list doing so (2 bytes overhead for
  88. the List Manager).
  89.  
  90. How do I get the start of the array from the LDEF resource? I
  91. don't want to muck around with the refcon field or anything. Just
  92. get 4 byte fixed in memory to store a handle. (refcon -- I want
  93. as small changes as possible to the rest of the application. Some
  94. madman might want to use my kludge later! :-)) Oh, to make things
  95. funnier, I'm doing the LDEF in MPW C (didn't work at once in LC4!)
  96. so there is no static variables between calls...
  97.  
  98.  
  99. The second question: If I get this running, can I send it out to
  100. the rest of the world without stomping on the author's or Apple's
  101. toes?
  102.  
  103. My boss allows me to do this on working time, since we would like
  104. to use NewsWatcher all over the university. 
  105.  
  106. If anyone is interested, drop a note and I'll let you know when I
  107. put a beta on some anonymous ftp server someplace.
  108.  
  109.  
  110. Bernt Budde                            |Religion, n: A daughter of
  111. bug@udac.uu.se                         |Hope and Fear, explaining to
  112. UDAC (Uppsala Univ. Computing Centre)  |Ignorance the Nature of the
  113.                                        |Unknowable.
  114. Don't for a moment believe UDAC,       |
  115. while being a nice place, have         |-Ambrose Bierce, The Devil's
  116. opinions like me!!                     |                 Dictionary
  117.  
  118. +++++++++++++++++++++++++++
  119.  
  120. From: sfalken@apple.com (Steven Falkenburg)
  121. Date: 25 Mar 92 02:52:15 GMT
  122. Organization: Apple Computer, Inc.
  123.  
  124. In article <bug.700510842@anas>, bug@anas.udac.uu.se (Bernt Budde) writes:
  125. > The second question: If I get this running, can I send it out to
  126. > the rest of the world without stomping on the author's or Apple's
  127. > toes?
  128.  
  129. If you get it up and running, I don't have any problem with you
  130. re-distributing it, provided:
  131.  
  132. 1) *please* add your name to the about box, and make it clear that I'm
  133.    not providing any support for NewsWatcher
  134.  
  135. 2) re-distribute the source code to your changes to the rest of the
  136.    internet community.
  137.  
  138. 3) don't number your version "1.0.3" or "1.1".  I'm not sure what to do
  139.    about this, but maybe you should put your initials or the initials
  140.    of your university in as part of the version.
  141.  
  142. There are now *quite* a few versions of NewsWatcher floating around, with
  143. little hope of re-integration.  The best thing to do would probably set
  144. up some kind of an FTP site where people could put source code for
  145. modified versions.  That way, if someone wanted, there might be some way
  146. for the code to be re-integrated.
  147.  
  148. Note that I'm not volunteering.  I don't have time, or permission, in my
  149. current job to devote a good percentage of my time to NewsWatcher.  It's
  150. simply unsupportable by me.  I have source to about 3-4 different
  151. NewsWatchers right now, and am not quite sure what to do with them.  I've
  152. also got some preliminary source to a >32k text viewer, but no time to
  153. integrate it.  Maybe some kind of electronic group could be organized to
  154. work on integrating changes and provide some support, since it appears
  155. there are many people using NewsWatcher on the net.
  156.  
  157. - -steve falkenburg
  158.  MacDTS -- Author of NewsWatcher & XferIt
  159.  sfalken@apple.com
  160.  
  161. ---------------------------
  162.  
  163. From: jovanovi@studsys.mscs.mu.edu (Steve Jovanovic)
  164. Subject: How to buy Zortech C++ ed. disc.!!?
  165. Date: 16 Mar 92 21:42:22 GMT
  166. Organization: Marquette University - Department MSCS
  167.  
  168. Hi Netters,
  169.  
  170. I've checked around, and it seems that the best bet for
  171. getting an affordable C++ compiler is Zortech C++.  It
  172. looks like the only two choices are MPW and Zortech.  The
  173. great news is that Zortech C++ is supposedly available for
  174. academic purchase for $110 (without MPW) and I think $150
  175. with.
  176.  
  177. And now the bad news...  I called Symantec and was bounced
  178. from person to person...they all kept saying try another
  179. number, etc.  It looks like Symantec doesn't plan on promoting
  180. Zortech C++ for the Mac--most of the people at Symantec I
  181. spoke with didn't even know it existed.
  182.  
  183. I was finally given the number for a company called EduTech.
  184. >From what I gather, they're a clearinghouse for educationally
  185. discounted software.  I've confirmed the $110 price above.
  186. BUT they only sell to university bookstores, etc., and I think
  187. they require the seller to buy a bunch of copies of any particular
  188. product.  
  189.  
  190. I spoke with the people at my university's bookstore, and they
  191. only deal with one distributor--it was a dead-end in terms of
  192. getting ZTC++.  I also spoke with a local Apple dealer which 
  193. handles educational sales for our uni, and no luck there either.
  194.  
  195. Has anyone had any luck in buying an ed. disc. copy of Zortech
  196. C++?  If other people are having the same kinds of problems I
  197. am, maybe we can get a group of interested buyers together and
  198. try and work something out with the powers that be?
  199.  
  200. Thanks,
  201.  
  202. steve jovanovic        jovanovi@studsys.mscs.mu.edu
  203.  
  204.  
  205. +++++++++++++++++++++++++++
  206.  
  207. From: stevem@cs.utexas.edu (Steve Anthony Mariotti)
  208. Date: 23 Mar 1992 18:02:31 -0600
  209. Organization: U Texas Dept of Computer Sciences, Austin TX
  210.  
  211. In article <2501@spool.mu.edu> jovanovi@studsys.mscs.mu.edu (Steve Jovanovic) writes:
  212.  
  213. >Has anyone had any luck in buying an ed. disc. copy of Zortech
  214. >C++?  If other people are having the same kinds of problems I
  215. >am, maybe we can get a group of interested buyers together and
  216. >try and work something out with the powers that be?
  217.  
  218. The University of Texas Union Microcenter (the largest dealer of Apple 
  219. Macintosh computers in the country) has it for sale for $71.  I called them
  220. up to ask them some questions about it, and they couldn't tell me anything
  221. other than the price and the fact that they didn't have any in stock, but
  222. would order it for me if I came in and paid for it.  No thanks.
  223.  
  224. The only person I spoke with who seemed knowledgable about programming
  225. environments on the Mac said that Symantec doesn't plan to support the
  226. Zortech C++ compiler, and that the C++ features that it offers will likely
  227. by spun-into version 6.0 of THINK C, the only C compiler Symantec officially
  228. supports.
  229.  
  230. This, coupled with the possible fact that Zortech C++ will require MPW, makes
  231. the whole thing seem pointless.
  232.  
  233. Any news on the release date of THINK C 6.0 and what features it will offer?
  234.  
  235. Steve Mariotti
  236.  
  237.  
  238.  
  239.  
  240. +++++++++++++++++++++++++++
  241.  
  242. From: siegel@world.std.com (Rich Siegel)
  243. Date: 24 Mar 92 00:31:55 GMT
  244. Organization: Symantec Language Products Group
  245.  
  246. In article <kssscnINNt8f@earth.cs.utexas.edu> stevem@cs.utexas.edu (Steve Anthony Mariotti) writes:
  247. >
  248. >The only person I spoke with who seemed knowledgable about programming
  249. >environments on the Mac said that Symantec doesn't plan to support the
  250. >Zortech C++ compiler, and that the C++ features that it offers will likely
  251. >by spun-into version 6.0 of THINK C, the only C compiler Symantec officially
  252. >supports.
  253.  
  254.     You should have talked to more people. :-)
  255.  
  256.     Zortech C++ version 2.1.3 for use with MPW was recently released.
  257. By Symantec. The Languages Group Tech Support staff does support Zortech C++,
  258. both for the Mac and for the PC.
  259.  
  260.     I'm not closely connected with the project, but those who worked
  261. on the recent release say that it's much better than the previous releases.
  262.  
  263.     Version 3.0 of the MPW compiler is in the works. So much for
  264. "doesn't plan to support".
  265.  
  266. >Any news on the release date of THINK C 6.0 and what features it will offer?
  267.  
  268.     As always, Symantec never pre-announces features or release dates,
  269. so anything you hear on those topics is rumor or speculation.
  270.  
  271. R.
  272.  
  273.  
  274.  
  275. - -- 
  276. - -----------------------------------------------------------------------
  277. Rich Siegel                              Internet: siegel@world.std.com
  278. Senior Software Engineer                 Applelink: SIEGEL
  279. Symantec Languages Group
  280.  
  281. +++++++++++++++++++++++++++
  282.  
  283. From: suitti@ima.isc.com (Stephen Uitti)
  284. Organization: Interactive Systems, Cambridge, MA 02138-5302
  285. Date: Tue, 24 Mar 1992 16:43:57 GMT
  286.  
  287. In article <BLLDH8.7uy@world.std.com> siegel@world.std.com (Rich Siegel) writes:
  288. >    Zortech C++ version 2.1.3 for use with MPW was recently released.
  289. >By Symantec. The Languages Group Tech Support staff does support Zortech C++,
  290. >both for the Mac and for the PC.
  291.  
  292. I have the 2.1.3b3 - I imagine it is a beta.  It does not support
  293. large model (an MPWism).  I was not able to get anything to link.
  294. Large model seems like a requirement for an OOP language.  Any
  295. libraries you are likely to want to use will be "large".
  296.  
  297. I did spend a week attempting to get a library to compile.  This
  298. was straight C code, that already compiled and ran under MPW C and
  299. Think C.  I ran into eight distinct bugs in the parser, including
  300. a completely unique implementation of the "Pascal" & "pascal" keyword.
  301.  
  302. I was not able to evaluate the speed of the compiler or the speed
  303. of the compiled code.
  304.  
  305. >    As always, Symantec never pre-announces features or release dates,
  306. >so anything you hear on those topics is rumor or speculation.
  307.  
  308. And I consider this a "good" thing.  I don't really want my managers
  309. to be tempted to base the project I'm working on on some product that
  310. has been announced but not shipped.
  311.  
  312. My attempt to use Zortech was to get around poor code generated
  313. by MPW C.  Think C was generating code that ran twice as fast as
  314. MPW C for the same code.  We narrowed it down to "divide by
  315. constant power-of-2" sequences.  Think C turned it into the
  316. appropriate shift, MPW left it as divide.  I don't recall if the
  317. variables involved were signed or unsigned.  If they were signed,
  318. the conversion to shift could be considered unsafe.
  319.  
  320. Stephen.
  321. suitti@ima.isc.com
  322.  
  323. +++++++++++++++++++++++++++
  324.  
  325. From: shite@sinkhole.unf.edu (Stephen Hite)
  326. Date: 24 Mar 92 14:19:42 GMT
  327. Organization: University of North Florida, Jacksonville
  328.  
  329. In article <kssscnINNt8f@earth.cs.utexas.edu> stevem@cs.utexas.edu (Steve Anthony Mariotti) writes:
  330. >In article <2501@spool.mu.edu> jovanovi@studsys.mscs.mu.edu (Steve Jovanovic) writes:
  331. >
  332. >>Has anyone had any luck in buying an ed. disc. copy of Zortech
  333. >>C++?  If other people are having the same kinds of problems I
  334. >
  335. >The only person I spoke with who seemed knowledgable about programming
  336. >environments on the Mac said that Symantec doesn't plan to support the
  337. >Zortech C++ compiler, and that the C++ features that it offers will likely
  338. >by spun-into version 6.0 of THINK C, the only C compiler Symantec officially
  339. >supports.
  340. >
  341. >This, coupled with the possible fact that Zortech C++ will require MPW, makes
  342. >the whole thing seem pointless.
  343. >
  344. >Any news on the release date of THINK C 6.0 and what features it will offer?
  345. >
  346. >Steve Mariotti
  347.  
  348.  
  349.   If what you say is true, then it's a nasty way of creating a C++ compiler.
  350. Zortech C++ was created from using Datalight C as a base from which to
  351. build.  What this leads to (instead of using a YACC-able grammar) is 
  352. at least an order of magnitude more blowouts during parsing because
  353. of incorrect parsing when an ambiguity fails to get resolved (by lexer/
  354. lookahead hacking).  There's a lot more munging going on between the 
  355. scanner and parser (due to the ambiguous nature of C++).   Jim Roskind 
  356. has shown that a production quality C++ YACC-able grammar can be 
  357. constructed so as to resolve much of the ambiguity which greatly reduces 
  358. the "smartness" of the lexer.
  359.  
  360.   Symantec has a hairy job on their hands if they plan to cross-pollinate
  361. Think C and Zortech C++.  I'm get the creeps....I'm outa here.
  362.  
  363.  
  364. Steve Hite                 
  365. shite@sinkhole.unf.edu
  366.  
  367. +++++++++++++++++++++++++++
  368.  
  369. From: mkahl@world.std.com (Michael Kahl)
  370. Date: 25 Mar 92 22:18:47 GMT
  371. Organization: Enginuity Inc.
  372.  
  373. In article <1992Mar24.164357.20050@ima.isc.com> suitti@ima.isc.com (Stephen Uitti) writes:
  374. >Think C was generating code that ran twice as fast as
  375. >MPW C for the same code.  We narrowed it down to "divide by
  376. >constant power-of-2" sequences.  Think C turned it into the
  377. >appropriate shift, MPW left it as divide.  I don't recall if the
  378. >variables involved were signed or unsigned.  If they were signed,
  379. >the conversion to shift could be considered unsafe.
  380. >
  381.  
  382. Must have been unsigned, or THINK C would have left it as divide,
  383. for exactly that reason.
  384.  
  385. - -- 
  386. Michael Kahl, Software Architect, Enginuity Inc.
  387. mkahl@world.std.com  -or-  75236.3146@compuserve.com
  388. Disclaimer:  Whoa!  Did I say THAT??!
  389.  
  390. +++++++++++++++++++++++++++
  391.  
  392. From: ksand@apple.com (Kent Sandvik)
  393. Date: 25 Mar 92 17:32:21 GMT
  394. Organization: MacDTS Mongols
  395.  
  396. In article <kssscnINNt8f@earth.cs.utexas.edu>, stevem@cs.utexas.edu (Steve
  397. Anthony Mariotti) writes:
  398. > The only person I spoke with who seemed knowledgable about programming
  399. > environments on the Mac said that Symantec doesn't plan to support the
  400. > Zortech C++ compiler, and that the C++ features that it offers will likely
  401. > by spun-into version 6.0 of THINK C, the only C compiler Symantec officially
  402. > supports.
  403.  
  404. That's interesting, I beta tested the latest Zortech C++ release 
  405. last Christmas...
  406.  
  407. Cheers,
  408. Kent
  409.  
  410. PS: Nope, won't support MacApp 3.0 yet.
  411. - --
  412. Kent Sandvik/DTS - Dynamic Language Evangelist.
  413. Opinions expressed are not private, and not owned by any company, 
  414. organization or group. Happy happy, joy joy!
  415.  
  416. ---------------------------
  417.  
  418. From: aep@world.std.com (Andrew E Page)
  419. Subject: MPW lib and dependencies
  420. Organization: The World Public Access UNIX, Brookline, MA
  421. Date: Wed, 18 Mar 1992 14:33:21 GMT
  422.  
  423. The MPW User's manual suggests using lib to consolodate
  424. object files in order to increase the speed of linking
  425. in building a project.  
  426.  
  427. I have been experimenting with this and found it to be quite
  428. tru.  
  429.  
  430. I have found a method of architecting build files (.make files)
  431. so that parts of a project are broken down into sections,
  432. and each section is libraried accordingly as needed and
  433. then linked into the final product.
  434.  
  435. I am thiking about writing an article (for posting or maybe for
  436. publication) outlining this and giving examples of how to 
  437. implement this.  
  438.  
  439. Is there any interested from the net on such techniques
  440. and would anyone be interested in seeing the article?
  441.  
  442. - -- 
  443. Andrew E. Page CTO(Warrior Poet)|   Decision and Effort The Archer and Arrow
  444. DSP Ironworks                   |     The difference between what we are
  445. Macintosh and DSP Technology    |           and what we want to be.
  446.  
  447. +++++++++++++++++++++++++++
  448.  
  449. From: aep@world.std.com (Andrew E Page)
  450. Organization: The World Public Access UNIX, Brookline, MA
  451. Date: Thu, 19 Mar 1992 14:33:32 GMT
  452.  
  453.   Something else.....
  454.  
  455.  
  456.    In writing this article are there any tricks/techniques that you
  457. feel you would like to have adressed.  Is ther something that you wish
  458. a makefile could do for you, but you just have not figured out how?
  459.  
  460.  
  461. - -- 
  462. Andrew E. Page CTO(Warrior Poet)|   Decision and Effort The Archer and Arrow
  463. DSP Ironworks                   |     The difference between what we are
  464. Macintosh and DSP Technology    |           and what we want to be.
  465.  
  466. +++++++++++++++++++++++++++
  467.  
  468. From: cnbr01@vaxa.strath.ac.uk
  469. Date: 26 Mar 92 11:40:15 GMT
  470. Organization: Strathclyde University VAX Cluster
  471.  
  472. In article <BLBCFL.HDn@world.std.com>, aep@world.std.com (Andrew E Page) writes:
  473. > I have found a method of architecting build files (.make files)
  474. > so that parts of a project are broken down into sections,
  475. > and each section is libraried accordingly as needed and
  476. > then linked into the final product.
  477. > I am thiking about writing an article (for posting or maybe for
  478. > publication) outlining this and giving examples of how to 
  479. > implement this.  
  480.  
  481. > Is there any interested from the net on such techniques
  482. > and would anyone be interested in seeing the article?
  483.  
  484. Yes some one is interested here.
  485. B.rasheed@uk.ac.strathclyde.vaxa
  486.  
  487. ---------------------------
  488.  
  489. From: deadman@garnet.berkeley.edu (Ben Haller)
  490. Subject: Writing a ResEdit editor - Questions & bugs
  491. Date: 19 Mar 92 01:39:12 GMT
  492. Organization: Stick Software
  493.  
  494.  
  495.   I am embarking upon writing a ResEdit editor.  I have (actually, Patrick
  496. Beard has) already converted the interfaces to be THINK C 5.0 compatable,
  497. so I'm off to a good start.  I've got the example editor compiling and
  498. running in ResEdit with no problem.
  499.   So now I have a few questions, and a few bugs in the manual to report.
  500.  
  501. 1. It seems that the name of the editor resource is not "@TYPE", but
  502.    has a leading null in it, making it a total length of 6 characters.
  503.    This is not documented anywhere in Chapter 7 of the 2.1 RE manual.
  504. 2. Are you *really* supposed to call BubbleUp in the two places that
  505.    the example code does?  The docs say "It is important to call BubbleUp
  506.    to avoid heap fragmentation", but this sounds like a classic case of
  507.    knee-jerk MoveHHi-calling.  Is there a *good* reason to call
  508.    BubbleUp in those places, or is this just a case of summer interns who
  509.    don't know what they're doing writing this stuff?  (note: I know why
  510.    BubbleUp / MoveHHi is supposed to be called - that is, I know what
  511.    it does.  But many people advocate calling MoveHHi *whenever* you lock
  512.    a handle, which is downright stupid and causes massive thrashing of
  513.    your heap zone for no reason.  I am trying to determine whether these
  514.    calls are a good or a bad idea in this particular case, not in general)
  515. 3. The example code does not call SetPort((*object)->wind) after creating
  516.    its window in the EditBirth routine.  It seems to assume that
  517.    EditorWindSetup will set the port to the window created.  But that is
  518.    not specified in the EditorWindSetup description.  Is this a bug in
  519.    the sample code?  In the docs it says, paraphrased, "If EditBirth will
  520.    need to access the current port, call 'SetPort((*object)->wind)'", but
  521.    they don't, so I conclude that one or the other is wrong.  No?
  522. 4. Mainly out of curiosity: The functions SetETitle and GetWindowTitle
  523.    perform, respectively, the operations of *getting* the editor's title
  524.    and *setting* the windows title, as far as any logical application
  525.    of those words goes.  So why are the names reversed?
  526. 5. In the section labelled "Routines used by editors" is a function called
  527.    "NoDoubleClickHere", which says in its description "call this...if you
  528.    don't want ResEdit to convert a double-click at this location to an
  529.    Open command."  An Open command opening *what*?  What exactly is
  530.    ResEdit going to open when the user double-clicks in my editor's
  531.    window?  I am utterly mystified by this function.  Do I really need to
  532.    call it?  I have a feeling it's supposed to be in the "Pickers"
  533.    section, but maybe I'm just clueless.
  534. 6. FindOwnerWindow could be a lot clearer.  It is apparently intended
  535.    to keep one editor from releasing a resource that another editor
  536.    is using, but it's not clear how this works at all.  Suppose two
  537.    editors both have gotten a handle to ICON 5000.  When they call
  538.    FindOwnerWindow, does each editor get the other editor - i.e. do
  539.    they both own it?  Or do both of them get the same editor as the
  540.    owner?  Perhaps an editor "owns" a resource only if it is *editing*
  541.    that resource - i.e. the ICON 5000 editor would be returned, if
  542.    the user had opened it.  But then in the above case, there are
  543.    two people using a resource, neither is actually editing it
  544.    (say they are both dialog editors), so what is keeping one from
  545.    releasing the ICON out from under the other one?  I think I have
  546.    a basic lack of understanding here as to how ResEdit is keeping
  547.    track of references to resources.  It's obviously doing something
  548.    a lot more sophisticated than the Resource Manager does, but I wish
  549.    they had documented it a little better.
  550. 7. How exactly are you supposed to use the clipboard?  There are
  551.    brief descriptions of ScrapCopy and ScrapEmpty, but this doesn't
  552.    seem sufficient - what about public / private scrap, what about
  553.    getting the contents of the scrap out, or seeing what's there,
  554.    etc.?  There is another "internal routine" (are these really for
  555.    internal use only?) called "GetResEditScrapFile" that sounds
  556.    promising, but - what am I supposed to do with it?  Is it a resource
  557.    file?  What naming, ID, etc. conventions should be followed?  Should
  558.    I release resources that I get from this file or not?  Etc. etc.
  559.  
  560.   I have a million more questions like this, but I'll stop there.
  561.   I just wonder, is it possible to write a good, stable ResEdit editor
  562. without pampering from DTS?  The documentation seems terribly
  563. incomplete, unclear, and ambiguous.  Are there any more fully-fledged
  564. editors available with source, from Apple or elsewhere?  The standard
  565. one is really pathetic, it doesn't illustrate half of the things that
  566. every editor should be able to do.  Why doesn't Apple ever release good,
  567. up-to-date code - this editor is weak, the only WDEF example you can
  568. get is the rDocProc one from System 6, for g*ds sake - Aargh!  If they
  569. want to make life easy for developers why don't they release and code
  570. that is actually *usable*?!??
  571.   I could say something offensive about Apple, but I won't :->
  572.  
  573. - -Ben Haller (deadman@garnet.berkeley.edu)
  574.  
  575. +++++++++++++++++++++++++++
  576.  
  577. From: jcav@quads.uchicago.edu (JohnC)
  578. Date: 19 Mar 92 02:12:11 GMT
  579. Organization: The Royal Society for Putting Things on Top of Other Things
  580.  
  581. In article <q8rc0INN2ah@agate.berkeley.edu> deadman@garnet.berkeley.edu (Ben Haller) writes:
  582. >every editor should be able to do.  Why doesn't Apple ever release good,
  583. >up-to-date code - this editor is weak, the only WDEF example you can
  584. >get is the rDocProc one from System 6, for g*ds sake - Aargh!  If they
  585. >want to make life easy for developers why don't they release and code
  586. >that is actually *usable*?!??
  587.  
  588. There are piles and piles of useable sample code.  The System 7 standard
  589. WDEF source code is available, as is the source to ALL of the System 6.0.x
  590. standard defProcs, that is: WDEF 0 and 1, CDEF 0 and 1, MDEF 0 and LDEF 0.
  591. All of this stuff is on ftp.apple.com and/or on the developer CDs.  Look a
  592. little harder next time.
  593.  
  594.  
  595. - -- 
  596. John Cavallino                  |  EMail: jcav@midway.uchicago.edu
  597. University of Chicago Hospitals |         John_Cavallino@uchfm.bsd.uchicago.edu
  598. Office of Facilities Management | USMail: 5841 S. Maryland Ave, MC 0953
  599. B0 f++ c+ g+ k s+(+) e+ h- pv   |         Chicago, IL  60637
  600.  
  601. +++++++++++++++++++++++++++
  602.  
  603. From: russotto@eng.umd.edu (Matthew T. Russotto)
  604. Date: Thu, 19 Mar 92 04:31:45 GMT
  605. Organization: College of Engineering, University of Maryland, College Park
  606.  
  607. In article <1992Mar19.021211.14013@midway.uchicago.edu> jcav@midway.uchicago.edu writes:
  608. >
  609. >There are piles and piles of useable sample code.  The System 7 standard
  610. >WDEF source code is available, as is the source to ALL of the System 6.0.x
  611. >standard defProcs, that is: WDEF 0 and 1, CDEF 0 and 1, MDEF 0 and LDEF 0.
  612. >All of this stuff is on ftp.apple.com and/or on the developer CDs.  Look a
  613. >little harder next time.
  614.  
  615. But the WDEF 0 code is BUGGY-- that is, the grow icon is sometimes
  616. offset-- see, Apple is providing unusable code AGAIN!!
  617.  
  618. <inset smiley for the incredibly humor impaired>
  619. - -- 
  620. Matthew T. Russotto    russotto@eng.umd.edu    russotto@wam.umd.edu
  621. Some news readers expect "Disclaimer:" here.
  622. Just say NO to police searches and seizures.  Make them use force.
  623. (not responsible for bodily harm resulting from following above advice)
  624.  
  625. +++++++++++++++++++++++++++
  626.  
  627. From: deadman@garnet.berkeley.edu (Ben Haller)
  628. Date: 19 Mar 92 19:20:47 GMT
  629. Organization: Stick Software
  630.  
  631. In article <1992Mar19.021211.14013@midway.uchicago.edu>
  632.    jcav@midway.uchicago.edu writes:
  633. >In article <q8rc0INN2ah@agate.berkeley.edu>
  634. >   deadman@garnet.berkeley.edu (Ben Haller) writes:
  635. >>every editor should be able to do.  Why doesn't Apple ever release good,
  636. >>up-to-date code - this editor is weak, the only WDEF example you can
  637. >>get is the rDocProc one from System 6, for g*ds sake - Aargh!  If they
  638. >>want to make life easy for developers why don't they release and code
  639. >>that is actually *usable*?!??
  640. >There are piles and piles of useable sample code.  The System 7 standard
  641. >WDEF source code is available, as is the source to ALL of the System 6.0.x
  642. >standard defProcs, that is: WDEF 0 and 1, CDEF 0 and 1, MDEF 0 and LDEF 0.
  643. >All of this stuff is on ftp.apple.com and/or on the developer CDs.  Look a
  644. >little harder next time.
  645.   I knew about the other defProcs, the CDEF and MDEF and so on.  But I had
  646. no idea those other WDEFs were available; sigh.  A good number of months
  647. ago a friend of mine disassembled and reverse-engineered the System 7
  648. WDEF to figure out the way that the window colors and handled in System 7
  649. (I could flame about that being undocumented, but with my luck it's in
  650. some TN somewhere that I missed :->)  So I guess that was wasted effort,
  651. unless the latest WDEF hadn't been released at that time...
  652.   Well, nobody has so far come up with better sample code for ResEdit
  653. editors than the really weak XXXX editor, so at least on that point 
  654. I (may) be on stable ground...
  655.   Flaming Apple is a thankless job, but someone's got to do it... :->
  656.   Well, so after all this, does anybody have anything to say about
  657. the main thrust of my post, ResEdit editors?  There seems to be very
  658. little information out there about these - doesn't anyone write them?
  659.  
  660. - -Ben Haller (deadman@garnet.berkeley.edu)
  661. "Do you know how many time zones there are in the Soviet Union?" - NegativLand
  662.  
  663. +++++++++++++++++++++++++++
  664.  
  665. From: stanger@otago.ac.nz (Nigel Stanger)
  666. Date: 20 Mar 92 22:19:44 GMT
  667. Organization: University of Otago, Dunedin, New Zealand
  668.  
  669. In article <q8rc0INN2ah@agate.berkeley.edu>, 
  670. deadman@garnet.berkeley.edu (Ben Haller) writes:
  671. >   I am embarking upon writing a ResEdit editor.  I have (actually, Patrick
  672. > Beard has) already converted the interfaces to be THINK C 5.0 compatable,
  673. > so I'm off to a good start.  I've got the example editor compiling and
  674. > running in ResEdit with no problem.
  675. >   So now I have a few questions, and a few bugs in the manual to report.
  676. [...]
  677. > 5. In the section labelled "Routines used by editors" is a function called
  678. >    "NoDoubleClickHere", which says in its description "call this...if you
  679. >    don't want ResEdit to convert a double-click at this location to an
  680. >    Open command."  An Open command opening *what*?  What exactly is
  681. >    ResEdit going to open when the user double-clicks in my editor's
  682. >    window?  I am utterly mystified by this function.  Do I really need to
  683. >    call it?  I have a feeling it's supposed to be in the "Pickers"
  684. >    section, but maybe I'm just clueless.
  685.  
  686. Just a guess here - I would say this is related to the likes of
  687. the DLOG editor. You double-click on the picture of the dialog it
  688. opens the corresponding DITL. The BNDL editor is much the same -
  689. double-click a set of icons and it opens the appropriate icon
  690. resource.
  691.  
  692. - -- 
  693. See ya
  694.                                 Nigel.
  695. - ----------------------------------------------------------------------
  696. Nigel Stanger,                  Internet: stanger@otago.ac.nz
  697. University of Otago,            Phone: +64 3 479-8179
  698. Dunedin, NEW ZEALAND.           Fax:   +64 3 479-8311
  699. Life is butter melon cauliflower.
  700.  
  701. +++++++++++++++++++++++++++
  702.  
  703. From: lim@iris.ucdavis.edu (Lloyd Lim)
  704. Date: 20 Mar 92 02:14:49 GMT
  705. Organization: U.C. Davis - Department of Computer Science
  706.  
  707. In article <qapifINNslo@agate.berkeley.edu> deadman@garnet.berkeley.edu (Ben Haller) writes:
  708. >In article <1992Mar19.021211.14013@midway.uchicago.edu> jcav@midway.uchicago.edu writes:
  709. >>In article <q8rc0INN2ah@agate.berkeley.edu> deadman@garnet.berkeley.edu (Ben Haller) writes:
  710. >>>
  711. >>>Why doesn't Apple ever release good,
  712. >>>up-to-date code - this editor is weak, the only WDEF example you can
  713. >>>get is the rDocProc one from System 6, for g*ds sake - Aargh!
  714. >>
  715. >>There are piles and piles of useable sample code.  The System 7 standard
  716. >>WDEF source code is available, as is the source to ALL of the System 6.0.x
  717. >>standard defProcs, that is: WDEF 0 and 1, CDEF 0 and 1, MDEF 0 and LDEF 0.
  718. >>All of this stuff is on ftp.apple.com and/or on the developer CDs.  Look a
  719. >>little harder next time.
  720. >
  721. >  I knew about the other defProcs, the CDEF and MDEF and so on.  But I had
  722. >no idea those other WDEFs were available; sigh.  A good number of months
  723. >ago a friend of mine disassembled and reverse-engineered the System 7
  724. >WDEF to figure out the way that the window colors and handled in System 7
  725. >(I could flame about that being undocumented, but with my luck it's in
  726. >some TN somewhere that I missed :->)  So I guess that was wasted effort,
  727. >unless the latest WDEF hadn't been released at that time...
  728.  
  729. It was wasted effort.  It was documented in TN 298 which was originally
  730. dated Jan 1991.  Granted, the TNs were not making it to the usual
  731. Internet distribution channels in the last year or so (comp.binaries.mac
  732. and ftp.apple.com), but it looks like they are finally getting their
  733. act back together after the layoffs.
  734.  
  735. There's some saying that goes something like:  Knowing the answers to
  736. questions is not important; it's knowing how to find the answers to questions
  737. that you don't know.  This skill is especially important for student
  738. programmers that don't have much time or money to waste.  :-)
  739.  
  740. Obligatory Apple flame to replace Ben's:
  741. Now that it looks like I'll have to maintain an AppleLink account, I've
  742. noticed the outrageous charges.  Since you're already paying a stiff
  743. $12 per hour, why is there an additional charge per K sent or received?
  744. And why is there a surcharge for sending and receiving Internet mail?
  745. Receiving mail?  How are you supposed to control this?  Maybe we should
  746. set up an auto-e-mailing program to John Sculley to complain about this...
  747.  
  748. I guess I should an append an :-) before I get in trouble.
  749.  
  750. +++
  751. Lloyd Lim     Internet: lim@cs.ucdavis.edu
  752.               America Online: LimUnltd
  753.               Compuserve: 72647,660
  754.               US Mail: 224 Lysle Leach Hall, U.C. Davis, Davis, CA 95616
  755.  
  756. +++++++++++++++++++++++++++
  757.  
  758. From: lsr@taligent.com (Larry Rosenstein)
  759. Date: 25 Mar 92 03:14:49 GMT
  760. Organization: Taligent, Inc.
  761.  
  762. In article <11489@ucdavis.ucdavis.edu>, lim@iris.ucdavis.edu (Lloyd Lim) writes:
  763. > And why is there a surcharge for sending and receiving Internet mail?
  764. > Receiving mail?  How are you supposed to control this?  Maybe we should
  765. > set up an auto-e-mailing program to John Sculley to complain about this...
  766.  
  767. You can send an empty message to TurnOff@INTERNET# to turn off incoming (and
  768. outgoing I think) Internet message for a particular AppleLink account. 
  769. (TurnOn@INTERNET# turns this back on.)  This was mentioned in the description of
  770. the Internet gateway service.
  771.  
  772. I think the surcharge stems from the fact that the company that runs AppleLink
  773. charges Apple to send and receive these messages; Apple simply passes the cost
  774. onto the AppleLink users.  (The group at Apple that maintains the actual
  775. gateway, is happy to provide that service for free.)
  776. - --
  777. Larry Rosenstein
  778. Taligent, Inc.
  779. lsr@taligent.com
  780.  
  781. ---------------------------
  782.  
  783. From: erh0362@tesla.njit.edu
  784. Subject: __NewPtr
  785. Date: 22 Mar 92 14:32:24 GMT
  786. Organization: New Jersey Institute of Technology
  787.  
  788.  
  789.         Noodling around in Inside Mac I discovered the NewPtr() and
  790. NewHandle() functions which seem roughly equivalent to the standard
  791. library's malloc(). I also found __NewPtr which seems to be an assembly
  792. equivalent that has the nice feature of allowing one to clear the memory
  793. first before using it like the standard libraries calloc(). Not being an
  794. assembly hacker however I was wondering if there's a way in straight
  795. THINK C to use NewPtr() or something equivalent to get either a handle
  796. or a pointer to a block of cleared memory?
  797.  
  798. Elliotte Rusty Harold        Department of Applied Mathematics
  799. elharo@m.njit.edu        New Jersey Institute of Technology
  800. erh0362@tesla.njit.edu        Newark, NJ 07103
  801.  
  802. +++++++++++++++++++++++++++
  803.  
  804. From: ericd@CATICSUF.CSUFRESNO.EDU (Eric W. Douglas)
  805. Date: 22 Mar 92 19:51:19 GMT
  806.  
  807.  
  808. erh0362@tesla.njit.edu writes:
  809.  
  810.  
  811. >        Noodling around in Inside Mac I discovered the NewPtr() and
  812. >NewHandle() functions which seem roughly equivalent to the standard
  813. >library's malloc(). I also found __NewPtr which seems to be an assembly
  814. >equivalent that has the nice feature of allowing one to clear the memory
  815. >first before using it like the standard libraries calloc(). Not being an
  816. >assembly hacker however I was wondering if there's a way in straight
  817. >THINK C to use NewPtr() or something equivalent to get either a handle
  818. >or a pointer to a block of cleared memory?
  819.  
  820. Use NewPtrClear() or NewHandleClear()... both of these are illustrated 
  821. in Tech Note 218.
  822.  
  823. - --eric
  824.  
  825. * | Eric W. Douglas             Technojock               +1 209 897 5785 | *
  826. * | I'net: ericd@caticsuf.csufresno.edu      ericd@csufres.csufresno.edu | *
  827. * | AppleLink: STUDIO.D      Compuserve: 76170,1472       AOL: EWDOUGLAS | *
  828. * |                "if q -> p, and not p, then not q. NOT!"              | * 
  829.  
  830. +++++++++++++++++++++++++++
  831.  
  832. From: erh0362@tesla.njit.edu
  833. Date: 22 Mar 92 20:30:26 GMT
  834. Organization: New Jersey Institute of Technology
  835.  
  836. >>        Noodling around in Inside Mac I discovered the NewPtr() and
  837. >>NewHandle() functions which seem roughly equivalent to the standard
  838. >>library's malloc(). I also found __NewPtr which seems to be an assembly
  839. >>equivalent that has the nice feature of allowing one to clear the memory
  840. >>first before using it like the standard libraries calloc(). Not being an
  841. >>assembly hacker however I was wondering if there's a way in straight
  842. >>THINK C to use NewPtr() or something equivalent to get either a handle
  843. >>or a pointer to a block of cleared memory?
  844. > Use NewPtrClear() or NewHandleClear()... both of these are illustrated 
  845. > in Tech Note 218.
  846. > --eric
  847. > * | Eric W. Douglas             Technojock               +1 209 897 5785 | *
  848. > * | I'net: ericd@caticsuf.csufresno.edu      ericd@csufres.csufresno.edu | *
  849.  
  850.     Thanks. NewPtrClear worked perfectly. I wonder if anyone knows why 
  851. that's not documented in IM II-1 (or at least the version in Spinside Mac). 
  852. Now if someone could only point in the direction of a Toolbox replacement for 
  853. <assert.h> I could completely eliminate the UNIX beginnings of my program. I've 
  854. seen reference to a function called MemError() but I don't know what exactly to 
  855. pass it when I want to check that an allocation has succeeded or what to test 
  856. for in its return.                               
  857.  
  858. Elliotte Rusty Harold                elharo@shock.njit.edu
  859. (who really needs to buy a few more technical manuals or enough hard disk space 
  860. to hold SpinSide Mac so he can stop asking all these basic questions)
  861.  
  862. +++++++++++++++++++++++++++
  863.  
  864. From: keith@Apple.COM (Keith Rollin)
  865. Date: 23 Mar 92 03:06:25 GMT
  866. Organization: Apple Computer Inc., Cupertino, CA
  867.  
  868. In article <1992Mar22.093224.1@tesla.njit.edu> erh0362@tesla.njit.edu writes:
  869. >
  870. >        Noodling around in Inside Mac I discovered the NewPtr() and
  871. >NewHandle() functions which seem roughly equivalent to the standard
  872. >library's malloc(). I also found __NewPtr which seems to be an assembly
  873. >equivalent that has the nice feature of allowing one to clear the memory
  874. >first before using it like the standard libraries calloc(). Not being an
  875. >assembly hacker however I was wondering if there's a way in straight
  876. >THINK C to use NewPtr() or something equivalent to get either a handle
  877. >or a pointer to a block of cleared memory?
  878.  
  879. NewPtrClear() and NewHandleClear() will do this for you. They are
  880. documented in IM VI and in one of the Macintosh Technote (somewhere in
  881. the low 200's).  You'll also find them in your header files.
  882.  
  883. - -- 
  884. - ------------------------------------------------------------------------------
  885. Keith Rollin           ---            <Taligent .signature under construction>
  886. Disclaimer: Pretty soon, I really _won't_ be speaking for Apple...
  887.  
  888. +++++++++++++++++++++++++++
  889.  
  890. From: russotto@eng.umd.edu (Matthew T. Russotto)
  891. Date: 23 Mar 92 15:19:04 GMT
  892. Organization: College of Engineering, University of Maryland, College Park
  893.  
  894. In article <1992Mar22.093224.1@tesla.njit.edu> erh0362@tesla.njit.edu writes:
  895. >
  896. >        Noodling around in Inside Mac I discovered the NewPtr() and
  897. >NewHandle() functions which seem roughly equivalent to the standard
  898. >library's malloc(). I also found __NewPtr which seems to be an assembly
  899. >equivalent that has the nice feature of allowing one to clear the memory
  900. >first before using it like the standard libraries calloc(). Not being an
  901. >assembly hacker however I was wondering if there's a way in straight
  902. >THINK C to use NewPtr() or something equivalent to get either a handle
  903. >or a pointer to a block of cleared memory?
  904.  
  905. On reasonably new versions, you can use NewPtrClr (or is it
  906. NewPtrClear).  On older versions, you can write your own:
  907.  
  908. Ptr NewPtrClear(long size)
  909. {
  910.     asm {
  911.         MOVE.L    (A7)+, D0
  912.         DC.W 0xA15E ;  Double check that number-- I may have
  913. it wrong!
  914.         MOVE.L    A0,D0
  915.     }
  916. }
  917. - -- 
  918. Matthew T. Russotto    russotto@eng.umd.edu    russotto@wam.umd.edu
  919. Some news readers expect "Disclaimer:" here.
  920. Just say NO to police searches and seizures.  Make them use force.
  921. (not responsible for bodily harm resulting from following above advice)
  922.  
  923. +++++++++++++++++++++++++++
  924.  
  925. From: ABSURD@applelink.apple.com (Tim Dierks, ToyMeister, Cray abuser)
  926. Date: 26 Mar 92 02:46:18 GMT
  927. Organization: MacDTS, Apple Computer
  928.  
  929. In article <1992Mar22.093224.1@tesla.njit.edu>, erh0362@tesla.njit.edu writes:
  930. >         Noodling around in Inside Mac I discovered the NewPtr() and
  931. > NewHandle() functions which seem roughly equivalent to the standard
  932. > library's malloc(). I also found __NewPtr which seems to be an assembly
  933. > equivalent that has the nice feature of allowing one to clear the memory
  934. > first before using it like the standard libraries calloc(). Not being an
  935. > assembly hacker however I was wondering if there's a way in straight
  936. > THINK C to use NewPtr() or something equivalent to get either a handle
  937. > or a pointer to a block of cleared memory?
  938.  
  939. Try NewHandleClear() and NewPtrClear().  Note that there is also a system-heap
  940. option, which can be used with NewHandleSys() and NewPtrSys().  For maximum
  941. enjoyment, try NewHandleSysClear() and NewPtrSysClear().
  942.  
  943. Enjoy!
  944. Tim Dierks
  945. MacDTS, but I speak for myself
  946.  
  947. ---------------------------
  948.  
  949. From: jhp@wpi.WPI.EDU (John Petrangleo)
  950. Subject: Sound resources
  951. Date: 22 Mar 92 15:11:39 GMT
  952. Organization: Worcester Polytechnic Institute
  953.  
  954. I have been trying to use the sound manager routines to play sound
  955. resources with little success.  I am using Think C 5.0 and System 7.
  956.  
  957. If the sound resource is in the .rsrc file, there is no problem.
  958. They sound plays normally.  But if the sound resource is in the
  959. system file, I get an error saying that the sound is either corrupt
  960. or unavailable.  Maybe I'm not understanding the concept behind system
  961. resources, but I though that if a resource is in the system file, I
  962. could just use that ID to use it as if it were in my own resource file.
  963.  
  964. Thanks
  965.  
  966. - ---------------
  967. jhp@wpi.wpi.edu
  968. - ---------------
  969.  
  970. +++++++++++++++++++++++++++
  971.  
  972. From: REEKES@applelink.apple.com (Jim Reekes)
  973. Date: 26 Mar 92 23:31:06 GMT
  974. Organization: Apple Computer, Inc.
  975.  
  976. In article <1992Mar22.151139.5769@wpi.WPI.EDU>, jhp@wpi.WPI.EDU (John Petrangleo) writes:
  977. > I have been trying to use the sound manager routines to play sound
  978. > resources with little success.  I am using Think C 5.0 and System 7.
  979. > If the sound resource is in the .rsrc file, there is no problem.
  980. > They sound plays normally.  But if the sound resource is in the
  981. > system file, I get an error saying that the sound is either corrupt
  982. > or unavailable.  Maybe I'm not understanding the concept behind system
  983. > resources, but I though that if a resource is in the system file, I
  984. > could just use that ID to use it as if it were in my own resource file.
  985.  
  986. Show us your code, so we can see what's wrong...
  987.  
  988. This works for me...
  989.  
  990. err = SndPlay (nil, GetResource('snd ', 5), false);
  991.  
  992. It get the system resource and plays it.  But don't assume you know what
  993. resources are in the System file.  The only one that _has_ to be there
  994. is ID=1, and this is SimpleBeep.  All of the others can be removed and
  995. renamed.
  996.  
  997. - -----------------------------------------------------------------------
  998. Jim Reekes, E.O.             |     Macintosh Toolbox Engineering
  999.                              |          Sound Manager Expert
  1000. Apple Computer, Inc.         | "All opinions expressed are mine, and do
  1001. 20525 Mariani Ave. MS: 81-KS |   not necessarily represent those of my
  1002. Cupertino, CA 95014          |       employer, Apple Computer Inc."
  1003.  
  1004. ---------------------------
  1005.  
  1006. End of C.S.M.P. Digest
  1007. **********************
  1008.